package com.huawang.mdesign.model.service.util.reqif;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * Abstract base class for all data types.
 *
 * @author xdl
 * @since 2023-04-04
 */
@Getter
@Setter
public abstract class AbstractDatatypeDefinition extends Identifiable {

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_BOOLEAN)
    DatatypeDefinitionBoolean datatypeDefinitionBoolean;

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_STRING)
    DatatypeDefinitionString datatypeDefinitionString;

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_XHTML)
    DatatypeDefinitionXHTML datatypeDefinitionXHTML;

    @XStreamImplicit
    List<DatatypeDefinitionEnumeration> datatypeDefinitionEnumerations;

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_INTEGER)
    DatatypeDefinitionInteger datatypeDefinitionInteger;

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_REAL)
    DatatypeDefinitionReal datatypeDefinitionReal;

    @XStreamAlias(ReqIFConstants.DATATYPE_DEFINITION_DATE)
    DatatypeDefinitionDate datatypeDefinitionDate;

    /**
     * The back linkage to the owning ReqIFContent element.
     */
    @XStreamOmitField
    private ReqIFContent coreContent;
}
